<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFangCountsTable extends Migration
{
    public function up()
    {
        Schema::create('fang_counts', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('rid',50)->default(0)->comment('租客id');
            $table->unsignedInteger('fang_id')->default(0)->comment('房源ID');
            $table->unsignedInteger('click')->default(0)->comment('浏览次数');
            $table->timestamps();
            $table->softDeletes();
        });
    }
    public function down()
    {
        Schema::dropIfExists('fang_counts');
    }
}
